Update for consistency with Gala#219
Conversation
…ields. Origin for getFields can be (0, 0, 0) with an optional toggle.
There was a problem hiding this comment.
Pull request overview
Updates the EXP basis evaluation APIs to be consistent with Gala by making getAccel() / getFields() evaluate in the coefficient-defined coordinate origin (with an opt-out for getFields(..., origin=true)), and adjusts header installation/including for CUDA-related headers.
Changes:
- Add an
originboolean toBasis::getFields/getFieldsCoefsand plumb it through the pybind layer. - Shift
computeAccelimplementations to use the coefficient center (coefctr) sogetAccel()operates in simulation coordinates. - Install CUDA
.cuHheaders publicly and update internal includes to use quoted form ("...").
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
pyEXP/BasisWrappers.cc |
Updates Python bindings/signatures and docstrings for the new origin behavior. |
include/SLGridMP2.H |
Switch CUDA header includes to quoted form for installed-header resolution. |
include/EmpCylSL.H |
Same include-path adjustment for CUDA headers. |
include/cudaParticle.cuH |
Adjust include style to quoted form to work from installed include directories. |
include/cudaMappingConstants.cuH |
Same include-path adjustment for CUDA headers. |
include/BiorthCyl.H |
Consolidate/add CUDA includes under HAVE_LIBCUDA==1 with quoted includes. |
include/BiorthCube.H |
Same CUDA include consolidation as BiorthCyl.H. |
expui/CMakeLists.txt |
Adds CUDA .cuH headers to the public installed header set. |
expui/BiorthBasis.cc |
Applies coefficient-center shifting inside computeAccel; updates an internal getFields call to use origin=true. |
expui/BasisFactory.H |
Extends the public Basis API with origin parameter (virtual signature change). |
expui/BasisFactory.cc |
Implements centering logic for getFields / getFieldsCoefs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/5f75bca1-eb95-4f51-8ab6-9272eb114eca Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/56a9b4d8-bfcc-4bf8-9b5d-ccaa48888105 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/56a9b4d8-bfcc-4bf8-9b5d-ccaa48888105 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
…getFieldsCoefs Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/48c9ee4b-35ac-4a63-b3cb-8ecac31ecc71 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/588ca0c8-f717-4041-8cf3-86e2c5314792 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/5de301ef-07d4-4d2c-8595-cf3fe1b35194 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/fe07195b-408a-42d0-b748-e96ed78bf175 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
Agent-Logs-Url: https://github.com/EXP-code/EXP/sessions/fe07195b-408a-42d0-b748-e96ed78bf175 Co-authored-by: The9Cat <25960766+The9Cat@users.noreply.github.com>
The9Cat
left a comment
There was a problem hiding this comment.
Looks fine to me. I will test it quickly.
Feature update
The
getAccelandgetFieldsAPI now evaluate in the coordinate origin specified by the coefficients. Previous behavior required the user to supply the desired center. This is needed for Gala, but users now of the option of choosing the expansion center as origin (default) or the coefficient-specified center ingetFields().This fixes a bug in the sense that the original interface used by Gala was not implemented as intended.
Details
getAccel()has the same call signature in the API but now uses the center metadata fields in the registered coefficient instance so that the coordinates are simulation coordinates.getFields()retains the original behavior. If one needs the same centering behavior asgetAccel(), I have added a new member function that uses the coordinate origin:getFieldsOrigin().Warnings
While not formally an API-breaking change, any workflows that used
getAccel()and assumed expansion origin will find that they now are using the original simulation origin. For this reason, I am basing this PR on devel.The Gala calls to
getFields()inexp_fields.ccwill need to be updated togetFieldsOrigin().Additional minor fix
Updated the public header target to include CUDA-specific files.
ToDo